<template>
  <div class="adm-center-popup">
    <div class="adm-mask" v-show="popshow" @click="close"></div>
    <div class="adm-bottom-popup-wrap" v-if="isMobile">
      <transition name="el-zoom-in-bottom">
        <div v-show="popshow">
          <slot />
        </div>
      </transition>
    </div>
    <transition name="el-fade-in-linear" v-else>
      <div class="adm-center-popup-wrap" v-show="popshow">
        <slot />
      </div>
    </transition>
  </div>
</template>
<script>
export default {
  name: 'popupBar',
  props: {
    isMobile: {
      type: Boolean,
      default: false
    },
    popshow: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {

    }
  },
  methods: {
    close() {
      this.$emit('update:popshow', false)
    }
  }
}
</script>
<style lang="scss">
.adm-mask {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  opacity: 1;
}

.adm-center-popup-wrap {
  position: fixed;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: auto;
  transform: translate(-50%, -50%);
  z-index: 1001;
}

.adm-bottom-popup-wrap {
  position: fixed;
  z-index: 1;
  // top: 50%;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translate(-50%, 0);
  z-index: 1001;
}
</style>